#ifndef RECEIVEUDP_H
#define RECEIVEUDP_H

#include <QObject>
#include <QString>
#include <QDebug>
#include <QtNetwork>

class receiveudp : public QObject
{
    Q_OBJECT
public:
    explicit receiveudp(QObject *parent = 0);
    ~receiveudp();

public slots:
    void setPort(const qint16& port);

signals:
    void getBroadMessage(const QString msg);

private:
    QUdpSocket *receiver;
    qint16 udpPort;

    QString ipAddress;
    QString message;

private slots:
    void processPendingDatagram();

};

#endif // RECEIVEUDP_H
